package com.cloud.business.dao.sys;

import com.cloud.business.dao.base.MyBaseMapper;
import com.cloud.business.entity.sys.SysAttach;
import com.cloud.business.entity.sys.SysRoleUser;
import com.cloud.business.model.sys.sysattachvm.SysAttachVm;

import java.util.List;

/**
 * <p>
 * 系统附件表 Mapper 接口
 * </p>
 *
 * @author dh
 * @since 2020-03-25
 */
public interface SysAttachMapper extends MyBaseMapper<SysAttach> {
    /**
     * 根据表名和业务Id获取附件Id列表
     *
     * @param busId
     * @param tableName
     * @return
     */
    List<Integer> getObjectIds(Integer busId, String tableName);

    /**
     * 根据表名和业务Id获取附件列表
     *
     * @param busId
     * @param tableName
     * @return
     */
    List<SysAttachVm> getListByBusId(Integer busId, String tableName);

    /**
     * 批量插入
     *
     * @param list
     * @return
     */
    int insertBatch(List<SysAttach> list);
}
